1. Field
Embodiments of the invention relate to a proactive technique for reducing occurrence of long write service time for a storage device with a write cache.
2. Description of the Related Art
A host (also known as a “host computer”) includes applications that may issue write requests (also known as a type of Input/Output (I/O) commands) to a disk storage system. The disk storage system includes write cache and disk storage (also known as backend disk storage) and is capable of writing data to the disk storage in response to the write requests.
Caching may be described as storing data in a write cache before writing the data to the disk storage. Caching is a common way to achieve electronic speed performance for writes to a disk storage system. The disk storage system with write cache stores data associated with the write requests in the write cache first and later writes the data to the disk storage (typically a slower medium) asynchronously.
This setup works well to improve performance as write caches are substantially faster than other storage devices (such as disk storage). However, since the capacity of the write cache is orders of magnitude smaller than the total capacity of the disk storage, destaging (moving data from the write cache to the disk storage) is important in managing the disk storage system.
Write caching avoids some disk operations altogether by eliminating re-writes and gathering together adjacent blocks of data so that they may be destaged in fewer physical operations. For write caching to be effective, data should be destaged quickly enough so that the write cache does not become full. If the write cache becomes full, it is necessary to hold off write requests from the applications at the host until space in the write cache is made available by completing some amount of destaging of data from the write cache to the disk storage. Delays of this nature may take a long time to resolve (e.g., 100 milliseconds (ms) or longer, which is several orders of magnitude higher than the electronic speeds on the order of one ms that writes normally take). Thus, there may be a long delay on a few write requests, while the other write requests are fast.
Existing techniques employ a simple threshold mechanism with one or more thresholds to prevent the write cache from becoming full. With such a threshold mechanism, once the write cache reaches a certain threshold, the disk storage system destages data from the write cache to the disk storage as quickly as possible. Thus, these thresholds trigger faster and faster destaging activity.
While these thresholds work well in some cases, there are occasions when a burst of host writing activity can quickly fill up the write cache to near its maximum capacity. When this happens, host write requests are held off entirely (i.e., not processed by the disk storage system until enough destaging activity can take place in order to make room for new data to be written to the write cache). Holding off the write requests results in a sudden drop in performance, as host write requests experience long delays.
Many applications are not tolerant of long duration write requests and may time-out.
Thus, with conventional write cache techniques, when there is enough space available in the write cache, the host write requests are serviced quickly (e.g., within a few milliseconds). When the write cache is full, the host write requests are “on hold” for a period of time, until there is enough space available in the write cache to write the data from the host application). When there are bursts of host write requests, the host may experience long write request response times, which may result in applications at the host timing out (i.e., the write requests are failed). Bursts of host requests may be described a large number of write requests issued close together.
Thus, there is a need in the art for avoiding long delays on write requests.